package com.power.sifa.approve.model;


import com.plf.core.common.domain.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.persistence.*;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
*  归档记录实体类
*/

@Entity
@ApiModel(value="归档记录")
@Data
@Table(name="Apl_archive",schema="sfapprove")
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Builder
@AllArgsConstructor
//@IdClass(Apl_archive.Apl_archivePK.class) 用于复合组件
public class Apl_archive extends BaseModel implements Serializable {

	private static final long serialVersionUID = 1L;

    @Id
    @Setter(AccessLevel.NONE)
    @ApiModelProperty(value = "applyid")
    private String id;

    @ApiModelProperty(value = "案号")
    private String code;

    @ApiModelProperty(value = "申请人")
    private String applicantname;

    @ApiModelProperty(value = "被申请人")
    private String targetname;

    @ApiModelProperty(value = "第三人")
    private String thirdname;

    @ApiModelProperty(value = "收案日期")
    private String acceptancedate;

    @ApiModelProperty(value = "结案日期")
    private String closeingdate;

    @ApiModelProperty(value = "立案日期")
    private String caserecorddate;

    @ApiModelProperty(value = "保存期限")
    private String storagelimit;

//    @ApiModelProperty(value = "案件承办人")
//    private String handlername;

    @ApiModelProperty(value = "案由")
    private String reason;

    @ApiModelProperty(value = "案卷详情说明")
    private String detail;

    @ApiModelProperty(value = "纸质正卷册数")
    private Integer paperpositivebook;

    @ApiModelProperty(value = "纸质正卷页数")
    private Integer paperpositivepage;

    @ApiModelProperty(value = "纸质副卷册数")
    private Integer paperreversebook;

    @ApiModelProperty(value = "纸质副卷页数")
    private Integer paperreversepage;

    @ApiModelProperty(value = "纸质其他卷册数")
    private Integer paperotherbook;

    @ApiModelProperty(value = "纸质其他卷页数")
    private Integer paperotherpage;

    @ApiModelProperty(value = "电子正卷册数")
    private Integer elepositivebook;

    @ApiModelProperty(value = "电子正卷页数")
    private Integer elepositivepage;

    @ApiModelProperty(value = "电子副卷册数")
    private Integer elereversebook;

    @ApiModelProperty(value = "电子副卷页数")
    private Integer elereversepage;

    @ApiModelProperty(value = "电子其他卷册数")
    private Integer eleotherbook;

    @ApiModelProperty(value = "电子其他卷页数")
    private Integer eleotherpage;

    @ApiModelProperty(value = "归档人id")
    private String loguserid;

    @ApiModelProperty(value = "归档人名称")
    private String logusername;

    @ApiModelProperty(value = "归档时间")
    private String logtime;

//    @ApiModelProperty(value = "案件承办人id")
//    private String handlerid;

    @ApiModelProperty(value = "检查人")
    private String checkper;

    @ApiModelProperty(value = "检查人id")
    private String checkperid;


    public Map<String, Object> parseMap() {
        Map<String, Object> map=new HashMap<>();
        map.put("id", this.getId());
        map.put("code", this.getCode());
        map.put("applicantname", this.getApplicantname());
        map.put("targetname", this.getTargetname());
        map.put("thirdname", this.getThirdname());
        map.put("acceptancedate", this.getAcceptancedate());
        map.put("closeingdate", this.getCloseingdate());
        map.put("caserecorddate", this.getCaserecorddate());
        map.put("storagelimit", this.getStoragelimit());
//        map.put("handlername", this.getHandlername());
        map.put("reason", this.getReason());
        map.put("detail", this.getDetail());
        map.put("paperpositivebook", this.getPaperpositivebook());
        map.put("paperpositivepage", this.getPaperpositivepage());
        map.put("paperreversebook", this.getPaperreversebook());
        map.put("paperreversepage", this.getPaperreversepage());
        map.put("paperotherbook", this.getPaperotherbook());
        map.put("paperotherpage", this.getPaperotherpage());
        map.put("elepositivebook", this.getElepositivebook());
        map.put("elepositivepage", this.getElepositivepage());
        map.put("elereversebook", this.getElereversebook());
        map.put("elereversepage", this.getElereversepage());
        map.put("eleotherbook", this.getEleotherbook());
        map.put("eleotherpage", this.getEleotherpage());
        map.put("loguserid", this.getLoguserid());
        map.put("logusername", this.getLogusername());
        map.put("logtime", this.getLogtime());
//        map.put("handlerid", this.getHandlerid());
        return map;
    }

    public String getId() {
        return id;
    }

    public void setId(Serializable id) {
        this.id = (String) id;
    }

    public Serializable getPrimaryKey() {
        return id;
        // return new Apl_archivePK(id, id2); 用于复合主键，请手动创建内部静态类
    }

    public void setPrimaryKey(Serializable key) {
        this.id = (String)key;

        //Apl_archivePK pk = (Apl_archivePK) key; 用于复合主键
        //this.id = pk.getId();
        //this.id2 = pk.getId2();
    }

}
